Instrumentation, in the context of computer programs, generally refers to additional code that is added to functions within a program in order to provide for additional functionality. The additional functionality can relate to additional functional hooks, ensuring security, providing for traceability, and so on. In any case, the added instrumentation intrinsically influences performance of the program. Thus, when such instrumentation is added indiscriminately to each function an overall performance of the program can suffer from increased overhead.
Moreover, while various methods determine the overall overhead for executing the program as a whole, assessing overhead in relation to particular segments of instrumentation can represent significant difficulties. This can be because the source code of the instrumentation is integrated alongside source code of the program itself thereby complicating the process of attributing the overhead to the source code of the program or to the source code of the instrumentation. Consequently, determining how to best instrument a program generally involves a manual trial and error process of adding and removing instrumentation, which is inefficient.